<script language="javascript">
	function back(){
		document.location="<?php echo site_url(); ?>/Obat";
	}
</script>
<div class="form-head">Form Obat</div>
<hr>
<?php
echo form_open("/Obat/formObat/".$parameter, array("name"=>"formObat","id"=>"medic_form"));
if($parameter == FALSE){
	$nama_obat	= set_value("nama_obat");
	$merek		= set_value("merek");
	$satuan		= set_value("satuan");
	$harga		= set_value("harga");
} else {
	$nama_obat	= $value["NAMA_OBAT"];
	$merek		= $value["MEREK"];
	$satuan		= $value["SATUAN"];
	$harga		= $value["HARGA"];
}
?>
<p>
	<label>Nama Obat</label>
	<input type="text" name="nama_obat" value="<?php echo $nama_obat; ?>">
	<?php echo form_error("nama_obat"); ?>
</p>
<p>
	<label>Merek Obat</label>
	<input type="text" name="merek" value="<?php echo $merek; ?>">
	<?php echo form_error("merek"); ?>
</p>
<p>
	<label>Jenis Satuan</label>
	<input type="text" name="satuan" value="<?php echo $satuan; ?>">
	<?php echo form_error("satuan"); ?>
</p>
<p>
	<label>Harga</label>
	<input type="text" name="harga" value="<?php echo $harga; ?>">
	<?php echo form_error("harga"); ?>
</p>
<p>
	<input type="submit" class="btn btn-success" id="submit" value="Simpan">
	<input type="reset" class="btn btn-success" id="submit" value="Reset">
	<input type="button" class="btn btn-success" id="submit" value="Kembali" onClick="back()">
</p>
<?php echo form_close(); ?>